VERSION 5.00 Begin VB.Form frmSmall Caption = "Simple Image Viewer" ClientHeight = 7110 ClientLeft = 2235 ClientTop = 870 ClientWidth = 5985 LinkTopic = "Form1" ScaleHeight = 7110 ScaleWidth = 5985 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton cmdShowImage Caption = "Show Image" Height = 495 Left = 1462 TabIndex = 4 Top = 6480 Width = 1215 End Begin VB.FileListBox filFileList Height = 2040 Left = 3052 Pattern = "*.jpg;*.gif; *.bmp" TabIndex = 3 Top = 360 Width = 2520 End Begin VB.DirListBox dirFolderList Height = 1215 Left = 397 TabIndex = 2 Top = 1170 Width = 2475 End Begin VB.DriveListBox drvDriveList Height = 315 Left = 397 TabIndex = 1 Top = 405 Width = 1440 End Begin VB.CommandButton cmdExit Caption = "E&xit" Height = 495 Left = 3307 TabIndex = 0 Top = 6480 Width = 1215 End Begin VB.Label lblImage BorderStyle = 1 'Fixed Single BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 397 TabIndex = 8 Top = 2460 Width = 5175 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Folder:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 397 TabIndex = 7 Top = 810 Width = 735 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "Files:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 3052 TabIndex = 6 Top = 45 Width = 555 End Begin VB.Label Label1 AutoSize = -1 'True Caption = "Drive:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 442 TabIndex = 5 Top = 45 Width = 600 End Begin VB.Image imgImage BorderStyle = 1 'Fixed Single Height = 3255 Left = 532 Stretch = -1 'True Top = 3000 Width = 4920 End Begin VB.Shape Shape1 FillColor = &H00FFFFFF& FillStyle = 0 'Solid Height = 3240 Left = 532 Top = 3000 Width = 4920 End Begin VB.Shape shpImageBk BackColor = &H00FFC0C0& BackStyle = 1 'Opaque BorderColor = &H00FF0000& FillColor = &H00FF8080& FillStyle = 7 'Diagonal Cross Height = 3525 Left = 390 Top = 2850 Width = 5190 End Attribute VB_Name = "frmSmall" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub cmdExit_Click() Unload Me End Sub Private Sub cmdShowImage_Click() 'Put image file name together and 'load image into image box Dim ImageName As String 'Check to see if filename blank If filFileList.FileName = "" Then Exit Sub 'Check to see if at root directory If Right(filFileList.Path, 1) = "\" Then ImageName = filFileList.Path + filFileList.FileName Else ImageName = filFileList.Path + "\" + filFileList.FileName End If lblImage.Caption = ImageName imgImage.Picture = LoadPicture(ImageName) End Sub Private Sub dirFolderList_Change() 'If directory changes, update file path filFileList.Path = dirFolderList.Path End Sub Private Sub drvDriveList_Change() 'If drive changes, update directory dirFolderList.Path = drvDriveList.Drive End Sub Private Sub filFileList_DblClick() Call cmdShowImage_Click End Sub